﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<%@ Register Assembly="CKFinder" Namespace="CKFinder" TagPrefix="CKFinder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
    <script src="Scripts/ckfinder/ckfinder.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <CKEditor:CKEditorControl ID="CKEditorControl1" runat="server"></CKEditor:CKEditorControl>
    </div>
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <input id="Button1" type="button" value="Browse Server" onclick="BrowseServer('<% =TextBox1.ClientID %>','Images');" class="button"/>
        
        <script type="text/javascript" language="javascript">
            $(function () {
                $("#Button1").click(function () {
                    var ckfinder = new CKFinder();
                    ckfinder.selectActionFunction = function (fileUrl) {
                        $('#<%=TextBox1.ClientID %>').val(fileUrl);
                    };
                    ckfinder.popup();
                });
            });
</script>
    </div>
    </form>
</body>
</html>
